<%-- 
    Document   : EditPostBody
    Created on : Apr 29, 2011, 5:36:12 PM
    Author     : Emyzzz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@taglib  uri= "http://java.sun.com/jstl/core_rt" prefix="core"%>
<%@taglib uri="/WEB-INF/tlds/editPost" prefix="edit" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Edit Post</title>

    </head>
    <body>

        <html:form action="/postOperations.do?pagenumber=${param.pagenumber}&actionType=edit">
            <center>
                 <edit:EditPostTagHandler postId="${param.postid}" />
                <h2> Post Title: <html:text property="postTitle" size="30" value='<%= (String)pageContext.findAttribute("title")%>'/></h2>
                <font size="2"><html:errors property="EmptyTitle"/></font>
                <br/>
                <font size="2"><html:errors property="EmptyBody"/></font>
                  <h4> <input type="button" value="Insert Code Block" id="codeblock" onclick="makecode()" /></h4>
                <html:textarea styleId="myt" property="postBody" rows="15" cols="50" style="width: 70%" value='<%= (String)pageContext.findAttribute("body")%>'>
                </html:textarea>
                <!-- here the thread id means post id -->
                <html:hidden property="postid" value="${param.postid}"/><br/><br/>
                <html:hidden property="memberid" value="${sessionScope.id}"/><br/><br/>
                <html:hidden property="threadid" value="${param.threadid}"/>


                <html:submit value="Edit post" style="width : 99px; height : 30px;"></html:submit>
            </center>
        </html:form>

    </body>
</html>